#include "mainwindow.h"
#include "ui_mainwindow.h"

void MainWindow::initBackground(QPixmap & pixmap)
{
    pixmap = pixmap.scaled(this->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
    QPalette palette = this->palette();
    palette.setBrush(QPalette::Window, QBrush(pixmap));
    this->setPalette(palette);
}
